package org.ccay.excel.exception;

import java.util.HashMap;
import java.util.Map;

/**
 * 定义Excel导出所使用的相关常量	
 * @author chaowangbang
 *
 */
public  abstract  class ExcelExportConstants {
	private static Map<String,String> excelExportStupportMap = null;
	
	/** 等待中 **/
	public static final String STATUS_WAITING = "0";
	
	/** 处理中 **/
	public static final String STATUS_EXPORTING = "1";
	
	/** 完成 **/
	public static final String STATUS_EXPORTED = "2";
	
	/** 异常 **/
	public static final String STATUS_EXCEPTION = "3";
	
	/** 处理中 **/
	public static final String IEXCEL_STATUS_EXPORTING = "1";
	
	/** 完成 **/
	public static final String IEXCEL_STATUS_EXPORTED = "2";
	
	/** 异常 **/
	public static final String IEXCEL_STATUS_EXCEPTION = "4";
	
	public static final int   EXPORT_BATCH_SIZE = 1000;
	
	public static final String EXPORT_BATCH_SIZE_PATH  ="Ccay.Excel.ExportBatchSize";
	
	/**
	 * EXCEL导出时，格式索引
	 */
	public static final String EXCEL_EXPORT_INT ="int";
	
	public static final String EXCEL_EXPORT_DOUBLE ="double";
	
	public static final String EXCEL_EXPORT_DATE ="date";
	
	public static final String EXCEL_EXPORT_TIMESTSMP ="timestamp";
	
	public static final String EXCEL_EXPORT_STRING ="string";
	
	public static final String EXCEL_EXPORT_BOOLEAN ="boolean";
	
	public static final String EXCEL_EXPORT_BYTE ="byte";
	
	
	
	//异常编码
	public static final String ExcelExportSupport_NOT_FOUND = "ccay.excel.00110001";
	
	public static final String SHEETS_NOT_FOUND = "ccay.excel.00110002";
	
	public static final String SHEET_NOT_FOUND = "ccay.excel.00110003";
	
	public static final String GET_VODATA_ERROR = "ccay.excel.00110004";
	
	public static final String VO_CLASS_NOT_FOUND = "ccay.excel.00110005";
	
	public static final String VO_CLASS_FIELD_TYPE = "ccay.excel.00110006";
	
	public static final String EXCEL_EXPORT_FILE_ERROR = "ccay.excel.00110007";
	
	public static final String Excel_EXPORT_CREATE_TASK_ERROR = "ccay.excel.00110008";
	
	static{
		excelExportStupportMap = new HashMap<String, String>();
		//int
		
		excelExportStupportMap.put("int", EXCEL_EXPORT_INT);
		excelExportStupportMap.put("integer", EXCEL_EXPORT_INT);
		excelExportStupportMap.put("short", EXCEL_EXPORT_INT);
		excelExportStupportMap.put("byte", EXCEL_EXPORT_BYTE);
		excelExportStupportMap.put("biginteger", EXCEL_EXPORT_INT);
		
		//double
		excelExportStupportMap.put("double", EXCEL_EXPORT_DOUBLE);
		excelExportStupportMap.put("float", EXCEL_EXPORT_DOUBLE);
		excelExportStupportMap.put("bigdecimal", EXCEL_EXPORT_DOUBLE);
		excelExportStupportMap.put("long", EXCEL_EXPORT_DOUBLE);
		
		
		
		//String
		excelExportStupportMap.put("string", EXCEL_EXPORT_STRING);
		excelExportStupportMap.put("boolean", EXCEL_EXPORT_BOOLEAN);
		excelExportStupportMap.put("charset", EXCEL_EXPORT_STRING);
		excelExportStupportMap.put("char", EXCEL_EXPORT_STRING);
		excelExportStupportMap.put("stringbuffer", EXCEL_EXPORT_STRING);
		excelExportStupportMap.put("Stringbuilder,", EXCEL_EXPORT_STRING);
		
		
		excelExportStupportMap.put("date", EXCEL_EXPORT_DATE);
		
		excelExportStupportMap.put("timestamp", EXCEL_EXPORT_TIMESTSMP);
	}
	
	//不同类型的数据 对应的文档格式
	public static Map<String,String>  getExcelExportStupportMap(){
		return excelExportStupportMap;
	}
}
